<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>操作值</title>
    <script type="text/javascript" src="../js/jquery-1.7.2.js"></script>
    <script type="text/javascript">
        $(function () {
            //获取id为testId的唯一父元素
            //console.log($("#testId").parent());
            //获取id为testId的下一个同辈元素
            console.log($("#testId").next());
            console.log($("#testId").prev());
        });
    </script>
</head>
<body>
<form action="">
    <input type="text">
    <input type="text" id="testId">
    <input type="text">
    <input type="text">
</form>

</body>
</html>